package com.clayecloud.lib_common.apis;

import androidx.room.Delete;

import com.clayecloud.lib_common.apis.entity.house.ClientUserBindHouse;
import com.clayecloud.lib_common.utils.MessageUtil;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.HTTP;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface HouseApi {

    @GET("houseuser/check")
    Observable<MessageUtil> checkUserBindHouse(@Query("userID")Integer userID);

    @GET("houseuser/getUserBindAllHouse")
    Observable<MessageUtil> getUserBindAllHouse(@Query("userID")Integer userID);

    @POST("houseuser/bindhouse")
    Observable<MessageUtil> userBindHouse(@Body ClientUserBindHouse clientUserBindHouse);

    @HTTP(method = "DELETE", path = "houseuser/deletehouse", hasBody = true)
    Observable<MessageUtil> deleteHouse(@Query("houseID")Integer houseID, @Query("userID")Integer userID);

}
